package homelesspartners.client.widgets;

import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.MenuBar;
import com.google.gwt.user.client.ui.MenuItem;

public class GiftTabMenuWidget extends Composite {

	private MenuBar menu = new MenuBar();
	private MenuItem chooseCities = null;
	private MenuItem chooseShelters = null;
	private MenuItem stories = null;
	private MenuItem finish = null;

	public GiftTabMenuWidget() {

		chooseCities = new MenuItem("1. choose city", new Command() {

			public void execute() {
				GiftTabWidget.getInstance().showChooseCity();

			}
		});

		chooseShelters = new MenuItem("2. choose shelter", new Command() {

			public void execute() {
				GiftTabWidget.getInstance().showChooseShelter();

			}
		});


		stories = new MenuItem("3. personal stories", new Command() {

			public void execute() {
				GiftTabWidget.getInstance().showStories();

			}
		});

		finish = new MenuItem("4. finish", new Command() {

			public void execute() {
				GiftTabWidget.getInstance().showFinishShopping();

			}
		});
		
		showChooseCity();
		
		initWidget(menu);
	}

	public void showChooseCity() {
		menu.clearItems();
		menu.addItem(chooseCities);
	}

	public void showChooseShelter() {
		showChooseCity();
		menu.addItem(chooseShelters);

	}

	public void showStories() {
		showChooseShelter();
		menu.addItem(stories);
	}

	public void showFinish() {
		showStories();
		menu.addItem(finish);
	}

}
